BITS 32

section .data
global run_retcode
run_retcode: dd 0

section .text
global jump_to

; void jump_to(uintptr entry)
jump_to:
    push ebp
    mov ebp, esp
    mov eax, [ebp + 8]    ; entry address
    call eax
    mov [run_retcode], eax ; save program return value
    pop ebp
    ret